#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    //设置一个默认选项
//    ui->radioButton_male->setChecked(true);
//    ui->label->setText("您选择的性别是:男");

//    ui->radioButton_other->setEnabled(false);
}

Widget::~Widget()
{
    delete ui;
}


//void Widget::on_radioButton_male_clicked()
//{
//    ui->label->setText("您选择的性别是:男");
//}

//void Widget::on_radioButton_female_clicked()
//{
//    ui->label->setText("您选择的性别是:女");
//}

//void Widget::on_radioButton_other_clicked()
//{
//    ui->label->setText("您选择的性别是:其他");
//}

void Widget::on_radioButton_clicked(bool checked)
{
    qDebug() << "clicked:" << checked;
}

void Widget::on_radioButton_2_pressed()
{
    qDebug() << "pressed";
}

void Widget::on_radioButton_3_released()
{
    qDebug() << "released";
}

void Widget::on_radioButton_4_toggled(bool checked)
{
    qDebug() << "toggled:" << checked;
}
